//
//  ListpViewController.m
//  XiangCaoJiaYuan
//
//  Created by long Kan on 17/10/18.
//  Copyright © 2017年 tongj. All rights reserved.
//

#import "ListpViewController.h"
#import "LIstPViewCell.h"
@interface ListpViewController ()<UITableViewDelegate,UITableViewDataSource>
{
    UITableView *_tableView;

}
@property (nonatomic,strong)NSMutableArray *dataArray1;

@end

@implementation ListpViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"我的工卡";
    _dataArray1  = [[NSMutableArray alloc]init];
    UIButton *backbutton = [[UIButton alloc]initWithFrame:CGRectMake(10, 20, 15, 25)];
    [backbutton setBackgroundImage:[UIImage imageNamed:@"香草园地-发布信息_03@2x"] forState:UIControlStateNormal];
    [backbutton addTarget:self action:@selector(goBacktoUp) forControlEvents:UIControlEventTouchUpInside];
    UIBarButtonItem *backItem = [[UIBarButtonItem alloc]initWithCustomView:backbutton];
    self.navigationItem.leftBarButtonItem = backItem;
    self.view.backgroundColor = [UIColor whiteColor];
    [self view1];
}
-(void)goBacktoUp{
    [self.navigationController popViewControllerAnimated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
-(void)view1{
    _tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, UIScreen_WIDTH, UIScreen_HEIGHT-50)];
    _tableView.delegate = self;
    _tableView.dataSource = self;
    _tableView.backgroundColor = [UIColor whiteColor];
    _tableView.showsVerticalScrollIndicator = NO;
    _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    [self.view addSubview:_tableView];

}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    [tableView deselectRowAtIndexPath:indexPath animated:YES];// 取消选中
    
}
-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    
    static NSString *identifier = @"LIstPViewCell";
    
    LIstPViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
    
    if (cell ==nil) {
        cell = [[NSBundle mainBundle]loadNibNamed:@"LIstPViewCell" owner:nil options:nil][0];
    }
 
    return cell;
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 5;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 80;
}


@end
